API Help
EPLAN API / API Reference / Actions / XPamsDeviceSelectionAction
XPamsDeviceSelectionAction
 Selects device or updates device-information
 It can be passed the full path of a project. When project is not opened, this action opens it and closes it automatically.
 Alternatively an object can be passed by a special DMBaseHandleContext.
 This object can be a project/function/connection.
 

Parameter Description
ProjectName
The full path of project(optional). When project specified by ProjectName is not open, this action opens it and closes it automatically.
Mode
 Mode (in)(optional)
 The following values are supported:
 • selectDevice : Selects new devices for the given objects (default)
 • updateDevice : Updates only device-information from articles of the given objects
 

Example
 Example 1 (Full path of project)
 
 XPamsDeviceSelectionAction /ProjectName:"C:\\My Folder\\MyProject.elk" //absolute
 XPamsDeviceSelectionAction /ProjectName:"C:\\My Folder\\MyProject"             //absolute without file-extension
 XPamsDeviceSelectionAction /ProjectName:"My Folder\\MyProject.elk"             //relative to standard-folder
 XPamsDeviceSelectionAction /ProjectName:MyProject.elk                                  //relative to standard-folder
 XPamsDeviceSelectionAction /ProjectName:MyProject                                              //relative to standard-folder without file-extension
 

 Example 3 (Full path of project, in scripting)
 
 CommandLineInterpreter oCommandLineInterpreter = new CommandLineInterpreter();
 bool bRet = oCommandLineInterpreter.Execute("XPamsDeviceSelectionAction /ProjectName:\"C:\\My Folder\\MyProject.elk\"");       //absolute
 bool bRet = oCommandLineInterpreter.Execute("XPamsDeviceSelectionAction /ProjectName:\"C:\\My Folder\\MyProject\"");           //absolute without file-extension
 bool bRet = oCommandLineInterpreter.Execute("XPamsDeviceSelectionAction /ProjectName:\"My Folder\\MyProject.elk\"");           //relative to standard-folder
 bool bRet = oCommandLineInterpreter.Execute("XPamsDeviceSelectionAction /ProjectName:MyProject.elk");                                  //relative to standard-folder
 bool bRet = oCommandLineInterpreter.Execute("XPamsDeviceSelectionAction /ProjectName:MyProject");                                              //relative to standard-folder without file-extension
 

 Example 4 (object passed by context)
 
 StorableObjectContext context = new StorableObjectContext();
 context.StorableObject = hProject;                             //option 1: project
 context.StorableObject = hFunction;                            //option 2: function
 context.StorableObject = hConnection;                  //option 3: connection
 new CommandLineInterpreter().Execute("XPamsDeviceSelectionAction ", context);